﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace SwyishChess.DesktopUI
{
    /// <summary>
    /// Interaction logic for CheckAlertWindow.xaml
    /// </summary>
    public partial class CheckAlertWindow : Window
    {
        public CheckAlertWindow()
        {
            InitializeComponent();

            // Place the window in the middle of screen
            WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen;
        }

        /// <summary>
        /// Overloaded constructor which accepts a message and displays it on the TextBlockAlert
        /// </summary>
        /// <param name="message">Message to be displayed</param>
        public CheckAlertWindow(string message) : this()
        {
            TextBoxAlert.Text = message;
            TextBoxAlert.Foreground = Brushes.Black;
            TextBoxAlert.FontSize = 50;
        }

        /// <summary>
        /// If back to game button is clicked, close the current window
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ButtonBackToGame_Click(object sender, RoutedEventArgs e)
        {
            this.Close();
        }
    }
}
